<template>
	<view class="fixed-bottom flex align-center border-top bg-white" style="height: 100rpx;">
		<input type="text" value="" v-model="content" class="flex-1 rounded bg-light font-md p-2 ml-2" placeholder="文明发言"
		 @confirm="submit" />
		<view class="iconfont icon-fabu flex align-center justify-center font-lg animated" style="width: 100rpx;" hover-class="text-main jello"
		 @click="submit"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				content: ''
			}
		},
		methods: {
			submit() {
				if (this.content === '') {
					return uni.showToast({
						title: '消息内容不能为空',
						icon: 'none'
					});
				}
				this.$emit('submit', this.content)
				// 清空输入框
				this.content = ''
			}
		},
	}
</script>

<style>
</style>
